public class question_07 {
}
class Solution_07 {
    public int reverse(int x) {
        long n=0;
        int temp=0;
        while (x!=0){
            temp=x%10;
            n=n*10+temp;
            x=x/10;
        }
        if((int)n==n){
            return (int)n;
        }else{
            return 0;
        }
    }
}
